package sniff.pack;

public class MyICMPPacket extends CommonIPChildPacket {
	protected int icmpType;
	protected int code;
	protected String checkSum;
	protected int identifierBE;
	protected int identifierLE;
	protected int seqNumBE;
	protected int seqNumLE;

	public MyICMPPacket() {

	}

	public MyICMPPacket(int icmpType, int code, String checkSum, int identifierBE, int identifierLE, int seqNumBE,
			int seqNumLE) {
		this.icmpType = icmpType;
		this.code = code;
		this.checkSum = checkSum;
		this.identifierBE = identifierBE;
		this.identifierLE = identifierLE;
		this.seqNumBE = seqNumBE;
		this.seqNumLE = seqNumLE;
	}

	public int getIcmpType() {
		return icmpType;
	}

	public void setIcmpType(int icmpType) {
		this.icmpType = icmpType;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getCheckSum() {
		return checkSum;
	}

	public void setCheckSum(String checkSum) {
		this.checkSum = checkSum;
	}

	public int getIdentifierBE() {
		return identifierBE;
	}

	public void setIdentifierBE(int identifierBE) {
		this.identifierBE = identifierBE;
	}

	public int getIdentifierLE() {
		return identifierLE;
	}

	public void setIdentifierLE(int identifierLE) {
		this.identifierLE = identifierLE;
	}

	public int getSeqNumBE() {
		return seqNumBE;
	}

	public void setSeqNumBE(int seqNumBE) {
		this.seqNumBE = seqNumBE;
	}

	public int getSeqNumLE() {
		return seqNumLE;
	}

	public void setSeqNumLE(int seqNumLE) {
		this.seqNumLE = seqNumLE;
	}
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("Icmp Type:"+this.icmpType+"\n");
		sb.append("Code:"+this.code+"\n");
		sb.append("Check Sum:"+this.checkSum+"\n");
		sb.append("Identifier(BE):"+this.identifierBE+"\n");
		sb.append("Identifier(LE):"+this.identifierLE+"\n");
		sb.append("Seq Num(BE):"+this.seqNumBE+"\n");
		sb.append("Seq Num(LE):"+this.seqNumLE+"\n");
		return sb.toString();
	}
}
